<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%-- <!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>密码修改</title>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui//themes/icon.css">
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/demo/demo.css">
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.min.js" ></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript">
	    
	function getData() {
		var url = "${pageContext.request.contextPath}/chpa/ss.do";
		var oldPwd= $('#oldPwd').val();
		var newPwdA = $('#newPwdA').val(); 
		var newPwsB = $('#newPwdB').val();
		if(oldPwd.replace(/(^s*)|(s*$)/g, "").length !==0&&newPwdA.replace(/(^s*)|(s*$)/g, "").length !==0&&newPwsB.replace(/(^s*)|(s*$)/g, "").length !==0){
			if (newPwdA==newPwsB) {
				var data = {"oldPwd":$('#oldPwd').val(),"newPwd":newPwdA}
				$.post(url,data,function(){
						$("span").text('${result}');
					})

			}else {
				$("span").text("两次密码输入不一致");
			}
		}else {
			$("span").text("输入不能为空");
		}

	}
	function restContext(){
		$(":password").val('');
		$('#oldPwd').focus();
		$("span").text("");
	}
	</script>
</head>
<body> --%>
请输入旧密码：<input type="password" name="oldPwd" id="oldPwd">
请输入新密码：<input type="password" name="newPwdA" id="newPwdA">
请再次确认新密码：<input type="password" name="newPwdB" id="newPwdB">
<input type="button" value="确认提交" onclick="getData()">
<input type="button" value="重置" onclick="restContext()">
<span></span>
<!-- </body>
</html> -->